package com.Utility;

public class Message_Bean implements Comparable<Message_Bean> {

	public String DateAndTime, Description, Attachments, Sender, Status,
			Actions, uniq_guid, msg_guid;

	public String getDateAndTime() {
		return DateAndTime;
	}

	public void setDateAndTime(String dateAndTime) {
		DateAndTime = dateAndTime;
	}

	public String getDescription() {
		return Description;
	}

	public void setDescription(String description) {
		Description = description;
	}

	public String getAttachments() {
		return Attachments;
	}

	public void setAttachments(String attachments) {
		Attachments = attachments;
	}

	public String getSender() {
		return Sender;
	}

	public void setSender(String sender) {
		Sender = sender;
	}

	public String getStatus() {
		return Status;
	}

	public void setStatus(String status) {
		Status = status;
	}

	public String getActions() {
		return Actions;
	}

	public void setActions(String actions) {
		Actions = actions;
	}

	public String getUniq_guid() {
		return uniq_guid;
	}

	public void setUniq_guid(String uniq_guid) {
		this.uniq_guid = uniq_guid;
	}

	public String getMsg_guid() {
		return msg_guid;
	}

	public void setMsg_guid(String msg_guid) {
		this.msg_guid = msg_guid;
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return super.toString();
	}

	public int compareTo(Message_Bean arg0) {
		// TODO Auto-generated method stub
		Message_Bean bean = null;
		try {

			System.out.println("arg0" + getDateAndTime());
			if (bean instanceof Message_Bean) {
				bean = arg0;
				return getDateAndTime().compareTo(bean.getDateAndTime());
			}
			
			
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return getDateAndTime().compareTo(bean.getDateAndTime());
		}

		 return 0;
	}

}
